build: add wasm support - #36
Conversation
|
@dfrankland can you split the codegen into a seperate commit just so that its easier to review? Also gratzie! |
|
I've rebased and moved file changes to Happy to make any other changes you'd like 👍 |
|
Sorry about the delay in reviewing this @dfrankland . Aiming to get back to this during this week. cc @pluiedev |
| if target == "wasm32-unknown-unknown" && matches!(link_mode, LinkMode::Dynamic) { | ||
| panic!( | ||
| "wasm32-unknown-unknown currently requires feature `link-static`; dynamic Ghostty wasm side modules are not supported" | ||
| ); | ||
| } |
There was a problem hiding this comment.
Dynamic linking is probably not going to be supported for any wasm32 target, including WASI
|
I attempted to address the comments added, and I've rebased this PR on top of |
|
@pluiedev I'll merge this in after landing your PR's. |
|
I've rebased once more onto |
|
Pending CI/CD. It failed previously |
|
I can't really run and adjust CI to ensure everything works, but I believe there's an issue with the Nix develop shell hook unsetting env vars needed on CI for Zig to build. I made a small work around to keep those env vars based on the I'm not really sure why local Nix develop shells would want to use the system SDK rather than the one provided by the Nix flake, so it's hard for me to tell if this is a change you'd want to accept. |
|
Rebased on to |
|
@dfrankland you have done more than enough. |
8131748 to
bc7e415
Compare
libghostty-vtalready supports compiling to wasm, we just needed to alter the setup for the correct bindings to be generated